package com.leil.source;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.MessageBuilder;

@EnableBinding(UserDefineSource.class)
public class SimpleSourceBean {
	
//	@Resource
//	private MessageChannel output;
	
	@Autowired
	private UserDefineSource source;
	
	
	public void publishInfo() {
		this.source.output().send(MessageBuilder.withPayload("aaa").build());
	}
	
}
